package services.impl;

import beans.ProfileInfo;
import dao.ProfileInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import services.ProfileService;

import java.util.List;

@Service
public class ProfileServiceImpl implements ProfileService {

    @Autowired
    private ProfileInfoDao profileDao;


    @Override
    public int deleteByPrimaryKey(Integer id) {
        profileDao.deleteByPrimaryKey(id);
        return 0;
    }

    @Override
    public int insert(ProfileInfo record) {
        int i =profileDao.insert(record);
        return i;
    }

    @Override
    public int insertSelective(ProfileInfo record) {
        int i = profileDao.insertSelective(record);
        return i;
    }

    @Override
    public ProfileInfo selectByPrimaryKey(Integer id) {
        ProfileInfo profileInfo = profileDao.selectByPrimaryKey(id);
        return profileInfo;
    }

    @Override
    public int updateByPrimaryKeySelective(ProfileInfo record) {
        int i = profileDao.updateByPrimaryKeySelective(record);
        return i;
    }

    @Override
    public int updateByPrimaryKey(ProfileInfo record) {
        int i = profileDao.updateByPrimaryKey(record);
        return i;
    }

    @Override
    public List<ProfileInfo> selectList() {
        List<ProfileInfo> list = profileDao.selectList();
        return list;
    }
    @Override
    public List<ProfileInfo> selectSelective(String select,String inputText) {
        List<ProfileInfo> list = profileDao.selectSelective(select,inputText);
        return list;
    }

    @Override
    public int count() {
        return profileDao.count();
    }
}
